#ifndef ONENET_H
#define ONENET_H
#include <Arduino.h>
#include <PubSubClient.h>


#define ONENET_DISCONNECTED 1 //已经断开
#define ONENET_CONNECTED 2    //已经连接上
#define ONENET_RECONNECT 3    //重连成功


// OneNet相关
extern PubSubClient mqttClient;
extern const char *mqttServer;   // MQTT服务器
extern const uint16_t mqttPort;
#define PRODUCT_ID "365396"
#define API_KEY "=YwVMxLyXSjeGSB1GKntDmZVQR0="
#define DEVICE_ID "616758553"
#define TOPIC "esp8266led"

void initOneNet(const char *productId,const char *apiKey,const char *deviceId);
int connectToOneNetMqtt();


#endif
